﻿Imports MySql.Data.MySqlClient

Partial Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Anthem.Manager.Register(Me)
        Anthem.Manager.AddScriptForClientSideEval(" $('.rounded').corners();")

    End Sub

    'Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
    '    Dim script As String = "  myLightWindow.activateWindow({"
    '    script = script & " href:   'inicio.aspx', "
    '    script = script & " title:  '', "
    '    script = script & " author:  'JQUINTANILLA', "
    '    script = script & " caption:  '', "
    '    ' script = script & "  left: 100,"
    '    script = script & "  width: 1024,"
    '    script = script & "  height: 768,"
    '    'script = script & "  top: 100"
    '    script = script & " });"

    '    Anthem.Manager.AddScriptForClientSideEval(script)
    'End Sub

    Protected Sub lnk_notas_Click(ByVal sender As Object, ByVal e As EventArgs) Handles lnk_notas.Click
        If Session("usuario") Is Nothing Then
            Panel1.Visible = True
            Panel1.UpdateAfterCallBack = True
            Panel2.Visible = False
            Panel2.UpdateAfterCallBack = True

        End If
        ViewState("formulario") = "notas"
        operatoria()

    End Sub
    Sub operatoria()
        Dim r As Random
        r = New Random(DateTime.Now.Millisecond)
     dim primero As Integer = r.Next(9) 
     dim segundo As Integer = r.Next(9) 
        ViewState("resultado") = primero + segundo
        lbl_operatoria.Text = primero.tostring() & "+" & segundo.tostring()
        lbl_operatoria.UpdateAfterCallBack = True

        lbl_operatoria2.Text = primero.tostring() & "+" & segundo.tostring()
        lbl_operatoria2.UpdateAfterCallBack = True


    End Sub


    Protected Sub lnk_pruebas_Click(ByVal sender As Object, ByVal e As EventArgs) Handles lnk_pruebas.Click
        If Session("usuario") Is Nothing Then
            Panel1.Visible = True
            Panel1.UpdateAfterCallBack = True
            Panel2.Visible = False
            Panel2.UpdateAfterCallBack = True

        End If
        ViewState("formulario") = "pruebas"
        operatoria()

    End Sub

    Protected Sub lnk_administracion_Click(ByVal sender As Object, ByVal e As EventArgs) Handles lnk_administracion.Click
        If Session("usuario") Is Nothing Then
            Panel1.Visible = False
            Panel1.UpdateAfterCallBack = True
            Panel2.Visible = True
            Panel2.UpdateAfterCallBack = True

        End If
        operatoria()
        ViewState("formulario") = "administracion"
    End Sub
End Class